package com.hellobike.haxing.modules.order.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hellobike.haxing.modules.order.mapper.typehandler.JSONObjectHandler;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @Description: 订单明细
 * @Author: haxing-boot
 * @Date: 2020-02-08
 * @Version: V1.0
 */
@Data
@TableName("t_order_detail")
public class OrderDetail implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 订单明细
     */
    @TableId(type = IdType.AUTO)
    private java.lang.Long id;
    /**
     * 订单id
     */
    @Excel(name = "订单id", width = 15)
    private java.lang.Long orderId;
    /**
     * 商品ID
     */
    @Excel(name = "商品ID", width = 15)
    private java.lang.Long productId;
    /**团购ID*/
    @Excel(name = "团购ID", width = 15)
    private Long groupId;
    /**
     * 商品code
     */
    @Excel(name = "商品编码", width = 30)
    private String spuCode;
    /**
     * skuCode
     */
    @Excel(name = "sku编码", width = 30)
    private String skuCode;

    /**
     * skuid
     */
    @Excel(name = "skuid", width = 15)
    private java.lang.Long skuId;
    /**
     * 用户ID
     */
    @Excel(name = "用户ID", width = 15)
    private java.lang.Long userId;
    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date createTime;
    /**
     * createBy
     */
    @Excel(name = "createBy", width = 15)
    private java.lang.Integer createBy;
    /**
     * updateTime
     */
    @Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date updateTime;
    /**
     * updateBy
     */
    @Excel(name = "updateBy", width = 15)
    private java.lang.Integer updateBy;
    /**
     * 价格
     */
    @Excel(name = "价格", width = 15)
    private java.math.BigDecimal price;
    /**
     * 数量
     */
    @Excel(name = "数量", width = 15)
    private java.lang.Integer num;
	/**活动商品数量*/
	@Excel(name = "活动商品数量", width = 15)
		private Integer promotionNum;
    /**
     * 未删除1删除0未删除
     */
    @Excel(name = "未删除1删除0未删除", width = 15)
    @TableLogic
    private java.lang.Integer deleted;
    /**
     * 商品名称
     */
    @Excel(name = "商品名称", width = 15)
    private java.lang.String title;
    /**
     * 提成比例
     */
    @Excel(name = "提成比例", width = 15)
    private java.math.BigDecimal commissionRate;
    /**
     * 业务类型1普通订单2限时购3拼团
     */
    @Excel(name = "业务类型1普通订单2限时购3拼团", width = 15)
    private java.lang.Integer bizType;
    /**
     * 限时购活动ID
     */
    @Excel(name = "限时购活动ID", width = 15)
    private java.lang.Long flashId;
    /**
     * 优惠金额
     */
    @Excel(name = "优惠金额", width = 15)
    private java.math.BigDecimal couponAmount;
    /**
     * sku图片
     */
    @Excel(name = "sku图片", width = 15)
    private java.lang.String skuImage;
    /**
     * 规格属性值
     */
    @Excel(name = "规格属性值", width = 15)
    @TableField(typeHandler = JSONObjectHandler.class)
    private java.lang.String dimensionValues;
    /**
     * 订单状态1创建待支付2订单取消3支付待提货4待揽收5已取货6已完成7交易关闭10售后申请11待退回12待返仓13待退款14售后失败15售后完成16被驳回 20退款中21已退款(退款成功)22退款失败
     */
    @Excel(name = "订单状态1创建待支付2订单取消3支付待提货4待揽收5已取货6已完成7交易关闭10售后申请11待退回12待返仓13待退款14售后失败15售后完成16被驳回 20退款中21已退款(退款成功)22退款失败", width = 15)
    private java.lang.Integer subStatus;
    /**
     * 交货时间
     */
    @Excel(name = "交货时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date deliveryTime;
    /**
     * 类型：1-生鲜 2-日杂
     */
    @Excel(name = "类型：1-生鲜 2-日杂", width = 15)
    private java.lang.Integer productType;

    /**
     * 团长提成单件佣金
     */
    @Excel(name = "团长提成佣金", width = 15)
    private java.math.BigDecimal shopAmount;
    @Excel(name = "商品总金额", width = 20)
    private BigDecimal productAmount;

    /**
     * 一级推广的佣金
     */
    private BigDecimal leaderAmount;
}
